/**
 * Created by CHEN on 2017/7/21.
 */

function sendParam() {
    var cat=$("#hcat").val();
    var keyWord=$("#keyWord").val();
    var rec=$("#hrec").val();
    var loc=$("#hloc").val();
    var order=$("#horder").val();
    window.location.href=$("#hpath").val()
        +"/product/list?keyWord="+keyWord
        +"&cat="+cat
        +"&rec="+rec
        +"&loc="+loc
        +"&order="+order;

}

function searchp() {
    window.location.href=$("#hpath").val()
        +"/product/list?keyWord="+$("#keyWord").val();
}

function more(obj) {
    window.location.href=$("#hpath").val()
        +"/product/list?rec="+obj;
}
$(function() {
    $.get($("#hpath").val()+"/product/names",{},function (result) {
        $( "#keyWord" ).autocomplete({
            source: result
        });
    });

} );